package com.tengol.course.spring.boot.web;

import com.tengol.course.spring.boot.customer.starter.service.HelloService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



/**
 * HelloController
 *
 * @author dongrui
 * @date 2020/05/17
 */
@RestController
@RequestMapping(value = "/hello")
@AllArgsConstructor
public class HelloController {
    private final HelloService helloService;

    @GetMapping("/sayHello")
    public String sayHello(@RequestParam("name") String name){
        return helloService.sayHello(name);
    }
}
